<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <title></title>
    <link rel="stylesheet" type="text/css" href="/tp/Public/css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="/tp/Public/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="/tp/Public/css/style.css"/>
</head>

<body>
<div id="container">
    <!---->

    <include file="Public/tpl/header.html" />

    <!---->

    <div id="main" class="container">
        <div class="row">
            <div class="col-md-8">

                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title"><b>通知中心</b></h3>
                    </div>
                    <div class="panel-body">
                        所有私信与评论回复
                    </div>
                </div>
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title"><b>私信</b></h3>
                    </div>
                    <div class="panel-body">
                        <ul class="media list-group">
                            <foreach name="messages" item="message" key="key">
                                <li class="list-group-item">
                                    <a class="media-left" href="{:U('User/info',array('id'=>$key))}">
                                        <img src="__PUBLIC__/images/{$message['avatar_name']}" alt="作者">
                                    </a>
                                    <div class="media-body">
                                        <h3 class="media-heading topic-list-heading">
                                            <span><i class="icon-envelope-alt icon"></i></span>
                                            <span>
                                                <a href="{:U('Message/detail',array('id'=>$key))}">{$message['last_message']}</a>
                                                <span class="badge text-right">{$message['notice_count']}</span>
                                            </span>
                                        </h3>
                                        <p class="text-muted">
                                            <span><i class="icon-time icon"></i></span>
                                            <span>{$message['create_time']}</span>
                                        </p>
                                    </div>
                                </li>
                            </foreach>
                        </ul>
                    </div>
                </div>
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title"><b>评论回复</b></h3>
                    </div>
                    <div class="panel-body">
                        <ul class="media list-group">
                            <foreach name="unviewed_comments_notices" item="unviewed_comments_notice" key="key">
                                <li class="list-group-item">
                                    <a class="media-left" href="{:U('User/info',array('id'=>$unviewed_comments_notice['from_id']))}">
                                        <img src="__PUBLIC__/images/{$unviewed_comments_notice['avatar_name']}" alt="作者">
                                    </a>
                                    <div class="media-body">
                                        <h3 class="media-heading topic-list-heading">
                                            <span><i class="icon-envelope-alt icon"></i></span>
                                            <span>
                                                在帖子
                                                <a href="{:U('Article/detail',array('id'=>$unviewed_comments_notice['article_id']))}">{$unviewed_comments_notice['title']}</a>中
                                                <span class="badge text-right">1</span>
                                            </span>
                                        </h3>
                                        <p class="text-muted">
                                            <span><i class="icon-time icon"></i></span>
                                            <span>{$unviewed_comments_notice['create_time']}</span>
                                            <span>对你评论</span>
                                            <span>{$unviewed_comments_notice['content']}</span>
                                        </p>
                                    </div>
                                </li>
                            </foreach>
                            <if condition="($unviewed_comments_notices neq null)and($viewed_comments_notices neq null)">
                                <hr/>
                            </if>

                            <foreach name="viewed_comments_notices" item="viewed_comments_notice" key="key">
                                <li class="list-group-item">
                                    <a class="media-left" href="{:U('User/info',array('id'=>$viewed_comments_notice['from_id']))}">
                                        <img src="__PUBLIC__/images/{$viewed_comments_notice['avatar_name']}" alt="作者">
                                    </a>
                                    <div class="media-body">
                                        <h3 class="media-heading topic-list-heading">
                                            <span><i class="icon-envelope-alt icon"></i></span>
                                            <span>在帖子<a href="{:U('Article/detail',array('id'=>$viewed_comments_notice['article_id']))}">{$viewed_comments_notice['title']}</a>中</span>
                                        </h3>
                                        <p class="text-muted">
                                            <span><i class="icon-time icon"></i></span>
                                            <span>{$viewed_comments_notice['create_time']}</span>
                                            <span>对你评论</span>
                                            <span>{$viewed_comments_notice['content']}</span>
                                        </p>
                                    </div>
                                </li>
                            </foreach>
                        </ul>
                    </div>
                </div>

            </div>

            <div class="col-md-4 hidden-xs">



            </div>
        </div>

    </div>

    <!---->
</div>
<!---->

<include file="Public/tpl/footer.html" />
<!---->
<script src="/tp/Public/js/jquery-1.11.0.js" type="text/javascript" charset="utf-8"></script>
<script src="/tp/Public/js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
</body>

</html>